package com.rc.saas.tenant.service.ugs;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.mapper.ugs.UgsMemberSuperLevelOrderMapper;
import com.rc.saas.tenant.search.ugs.UgsMemberSuperLevelOrderSearch;
import com.rc.saas.tenant.vo.ugs.UgsMemberSuperLevelOrderResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author frog
 * @date 2021/4/9
 */
@Service
public class UgsMemberSuperLevelOrderServiceImpl implements UgsMemberSuperLevelOrderService {

    @Autowired
    private UgsMemberSuperLevelOrderMapper ugsMemberSuperLevelOrderMapper;

    @Override
    public UgsMemberSuperLevelOrderMapper getMapper() {
        return ugsMemberSuperLevelOrderMapper;
    }

    @Override
    public PageInfo<UgsMemberSuperLevelOrderResultVo> listPageBuyRecord(UgsMemberSuperLevelOrderSearch ugsMemberSuperLevelOrderSearch) {
        PageHelper.startPage(ugsMemberSuperLevelOrderSearch.getOffset(), ugsMemberSuperLevelOrderSearch.getLimit());
        List<UgsMemberSuperLevelOrderResultVo> ugsMemberSuperLevelOrders =ugsMemberSuperLevelOrderMapper.listPageBuyRecord(ugsMemberSuperLevelOrderSearch);
        return new PageInfo<UgsMemberSuperLevelOrderResultVo>(ugsMemberSuperLevelOrders);
    }
}
